-
Notifications
You must be signed in to change notification settings - Fork 129
Maya: write color sets in create_model #3690
Maya: write color sets in create_model #3690
Conversation
…/off for write_color_sets in create_model/rig
Task linked: OP-3749 write color sets |
…/off for write_color_sets in create_model/rig
write_color_sets = False | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(CreateRig, self).__init__(*args, **kwargs) | ||
self.data["writeColorSets"] = self.write_color_sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't make much sense since the rig comes out as maya scene and does not strip any color set data. Animation instances however would extract as Alembic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are trying to unify colors sets (and other sets) flow and even though currently rig creator can only output Maya scene we plan to add fbx representation (replacing the skeletal mesh) so it will make sense then.
It is not influencing anything currently but we thought it would be good to have it there for future use and consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not influencing anything currently but we thought it would be good to have it there for future use and consistency
I see what you're going for - but it'd just confuse the artists into thinking it would do something useful for the rig family.
Also, most usual "rigs" won't be suitable to do an "fbx rig" export for - and then also automate animation
instance creation for in maya when loading them again. I'd say fbxRig
is a family of its own and should also come with its own creator, validators, etc.
If we're adding the option we should make the extractor capable of removing the values when publishing the maya scene to avoid any confusion whatsoever. Which is not an easy task for rigs with complex history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we have to decide if we remove the component sets from Rig Creator @antirotor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After internal discussion, we decided to keep the sets for Rig Creator there. We understand it is not very clean from the code perspective as these options are actually modifying the animation output, not the rig output itself, but as it does not have its own creator we gave preference to keeping all attributes settings in one place in preferences and not moving it outside just for the rig.
We think it will be more consistent from the user's point of view.
pattern_frame = [r'\.(?P<index>(?P<padding>0*)\d+)\.\D+\d?$'] | ||
collections, remainder = clique.assemble(collected_files, | ||
minimum_items=1) | ||
minimum_items=1, | ||
patterns=pattern_frame) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unrelated to the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, this is related to another ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unrelated to the PR description.
coming from #3683 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is
…/off for write_color_sets in create_model/rig
can you also add the Face sets to the corresponding settings? |
…/off for write_color_sets in create_model/rig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the code/logic for that? I don't recall seeing any Rig loader logic that sets anything like that for the to be created animation instance? Looking at the code the animation instance values have nothing to do with the setting that were set on the rig instance when being published. (That data is not even in the database or on disk, right?) Or what obvious thing am I missing? |
No, but it is somewhat convoluted - animation creator is called when rig is loaded into the scene: but since this creator is never called by user (and shouldn't be even listed in Creator dialog - but we can't hide it now), it's logical to move settings for it somewhere. Not saying it is ideal, but the options are:
|
The point I was trying to make was that the values you set on the Rig instance here in As such the values on CreateRig and the rig instance itself have no use. They do nothing, they don't propagate to the animation instance when the rig is loaded. Or where is that logic?
I'd say that IF the rig instance can set default values for the animation instance that could be quite useful. So that an advanced rigger could say "for this rig please publish animation with write color sets enabled by default" - I'd love to see that feature with "visibleOnly" to be settable per rig instance too. But the logic involved with trickling down decisions like that are much more complicated (the code isn't there yet as far as I know). What happens if:
TL;DR Having the settings on the animation/pointcache instance is worthwhile - but I'm not seeing how the logic added now for rig instances is doing anything useful. |
def __init__(self, *args, **kwargs): | ||
super(CreateRig, self).__init__(*args, **kwargs) | ||
self.data["writeColorSets"] = self.write_color_sets | ||
self.data["writeFaceSets"] = self.write_face_sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BigRoy is correct. This code has absolutely no bearing on any result anywhere. When we load the rig, an animation instance is created automatically, but that uses the settings from animation creator, rather than rig. So this introduces two attributes that are just extra and will create confusion.
It would of course be possible to have these parsed into the animation instance that is created, so that rigger could choose what values should be used down the line as starting point, but I'm not sure that it's actually worth the hassle at the moment, considering that simply adding the attributes to the animation creator solves the immediate issue for the upcoming production.
that being said, the confusion between animation
family, animation
creator and how and if they are affected from the rig, is almighty and should be addressed. I'm not convinced it is the responsibility of this PR though, so I reckon let's just remove the obsolete code from the rig creator here and separately have a look at how to clean up the rig -> animation workflow to make it a bit more clear.
1e710ae
to
c369b6e
Compare
@@ -33,7 +33,7 @@ | |||
}, | |||
"RenderSettings": { | |||
"apply_render_settings": true, | |||
"default_render_image_folder": "", | |||
"default_render_image_folder": "renders", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems unrelated to this PR, other than that I'm happy to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All code seems good to me, let's just please remove unrelated settings change as per comment
Brief description
Adding the on/off option of write color sets attributes in create_rig.py
Adding swtiching on/off clickbox to override the boolean option of write_color_sets_arttirbute in create_model.py and create_rig.py